﻿<?php //Seyret Component v.0.3//
/**
* @package Seyret
* @version 0.3
* @copyright Copyright (C) 2008 Mustafa DINDAR. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Seyret Video Component is a free software.
* See seyrettos.html for license notices and details.
*/

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('joomla.html.pane');


$document = & JFactory::getDocument();
$jslink=JURI :: root()."components/com_seyret/includes/js/jquery-ui-1.7.2.custom.min.js";
$document->addScript($jslink);




echo $this->toolbar;
echo $this->modtoolbar;




?>

<script type="text/javascript">
	jQuery(function() {
		index = jQuery.cookie('mainpagetab');
		if (!index) index = 0;
		
		jQuery("#tabsvideodets").tabs({ cookie: { expires: 30, name: 'mainpagetab', path: '/' },  selected: index });
	});
</script>

<div id="mainpagebody">

	<div id="mainpagemoduleposition1">{seyretmod1}</div>
	<div id="mainpagemoduleposition2">{seyretmod2}</div>
	<div style="clear:both;"></div>
	
	

<div class="jquerytabs">

	<div id="tabsvideodets">
		<ul>
			
			<li><a href="#latestvideos"><?php echo JText::_('Latest');?></a></li>
			<li><a href="#mostviewed"><?php echo JText::_('Most Viewed');?></a></li>
			<li><a href="#highestrated"><?php echo JText::_('Highest Rated');?></a></li>
			<li><a href="#featured"><?php echo JText::_('Featured');?></a></li>
			<li><a href="#categories"><?php echo JText::_('Categories');?></a></li>
		</ul>
		


		<!-- START OF LATEST VIDEOS-->
		<div id="latestvideos"  >
		
		
			<div>
				<div style="float:right;">
					<?php
					
						//create switch button here
						if ($this->mainlvdisplay=="oc") {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mlvd=multi");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchmulti.png";?>" alt="" />
						</a>
						
						<?php
						
						} else {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mlvd=oc");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchoc.png";?>" alt="" />
						</a>
						
						<?php							
						}
					
					?>

				</div>
				<div style="clear:both;"></div>
			</div>


				
			<?php
	
			//generate one column view
			if ($this->mainlvdisplay == "oc") {
			
				foreach ($this->latestvideos as $latestvideo) {
				
					$safevideotitle = str_replace("'", "\'", $latestvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($latestvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideooc">
					<div class="listedvideolistinfooc">

						<div class="listedvideolisttitledivoc">
							<a href="<?php echo $latestvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $latestvideo->videotitle;?>
							</a>
						</div>
						<div class="listedvideolistdescdivoc">
							<?php echo $latestvideo->videodescription;?>
						</div>
						<div class="listedvideolistfootdivoc">
							<?php echo JText::_('Added Date');?>: <?php echo $latestvideo->addeddate;?>   - <?php echo JText::_('Duration');?>: <?php echo $latestvideo->duration;?>
						</div>
						
					</div>
					
					<div class="listedvideolistthumbdivoc">
						<a href="<?php echo $latestvideo->videolink;?>">
							<img class="listedvideolistthumbnailoc" src="<?php echo $latestvideo->videothumbnail;?>" alt=""/> 
						</a>
						<div id="lvaddtoqlbdiv<?php echo $latestvideo->id; ?>" class="videolistqlbtnoc">

							<img id="lvaddtoqlimg_js_<?php echo $latestvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $latestvideo->id; ?>', '<?php echo htmlentities($latestvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $latestvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
							<img id="lvaddtoqlimg_js_rem<?php echo $latestvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

						</div>						
					</div>

					<div class="listedvideolistextrasdivoc">
	
							
							<?php echo $latestvideo->useravatar; ?><br/>
							<?php echo $latestvideo->usernamelinked; ?>
							<div style="">
								<?php echo $latestvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<?php echo JText::_('Views');?> : <?php echo $latestvideo->hits; ?>
													
							
						
					</div>					

					
					<div class="clear"></div>
				</div>



				<?php	
	 
				
				}
						
			} else {

				foreach ($this->latestvideos as $latestvideo) {
				
					$safevideotitle = str_replace("'", "\'", $latestvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($latestvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideomc">
					<div class="backgroundpadding">
						<div class="listedvideolisttitledivmc">
							<a href="<?php echo $latestvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $latestvideo->videotitle;?>
							</a>
						</div>
					</div>
					
					<div class="backgroundpadding">
						<div class="listedvideolistbodymc">
							<div class="listedvideolistthumbdivmc">
								<a href="<?php echo $latestvideo->videolink;?>">
									<img class="listedvideolistthumbnailmc" src="<?php echo htmlentities($latestvideo->videothumbnail);?>" alt=""/> 
								</a>
								<div id="lvaddtoqlbdiv<?php echo $latestvideo->id; ?>" class="videolistqlbtnmc" >

									<img id="lvaddtoqlimg_js_<?php echo $latestvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $latestvideo->id; ?>', '<?php echo htmlentities($latestvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $latestvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
									<img id="lvaddtoqlimg_js_rem<?php echo $latestvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

								</div>	

								<div class="listedvideolistdurationdivmc"><?php echo $latestvideo->duration;?>
								</div>
								
							</div>
							<div style="clear:both;"></div>
							<div class="listedvideolistvotestarsmc">
								<?php echo $latestvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<div class="listedvideousernamemc">
								<?php echo $latestvideo->usernamelinked; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo $latestvideo->addeddate; ?>
							</div>
							
							<div class="clear"></div>

							<div class="listedvideousernamemc">
								<?php echo JText::_('Views');?>: <?php echo $latestvideo->hits; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo JText::_('Comments');?>: <?php echo $latestvideo->commentcount; ?>
							</div>
							
							<div class="clear"></div>

							
						</div>
					</div>
				</div>
				


				<?php	
	 
				
				}			
			
			
			}
			
			
			?>
			
			<div class="clear"></div>
			<div class="paginatordiv">
			
				<?php echo $this->lvpageNav; ?>
			
			</div>		
						
			<div style="clear:both;"></div>
				
		</div>
		<!-- END OF LATEST VIDEOS-->
		
		
		
		
		<!-- START OF MOST VIEWED VIDEOS-->
		<div id="mostviewed"  >

			<div>
				<div  style="float:right;">
					<?php
					
						//create switch button here
						if ($this->mainmvdisplay=="oc") {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mmvd=multi");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchmulti.png";?>" alt="" />
						</a>
						
						<?php
						
						} else {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mmvd=oc");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchoc.png";?>" alt="" />
						</a>
						
						<?php							
						}
					
					?>

				</div>
				<div style="clear:both;"></div>
			</div>


				
			<?php
	
			//generate one column view
			if ($this->mainmvdisplay == "oc") {
			
				foreach ($this->mostviewedvideos as $mostviewedvideo) {
				
					$safevideotitle = str_replace("'", "\'", $mostviewedvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($mostviewedvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideooc">
					<div class="listedvideolistinfooc">

						<div class="listedvideolisttitledivoc">
							<a href="<?php echo $mostviewedvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $mostviewedvideo->videotitle;?>
							</a>
						</div>
						<div class="listedvideolistdescdivoc">
							<?php echo $mostviewedvideo->videodescription;?>
						</div>
						<div class="listedvideolistfootdivoc">
							<?php echo JText::_('Added Date');?>: <?php echo $mostviewedvideo->addeddate;?>   - <?php echo JText::_('Duration');?>: <?php echo $mostviewedvideo->duration;?>
						</div>
						
					</div>
					
					<div class="listedvideolistthumbdivoc">
						<a href="<?php echo $mostviewedvideo->videolink;?>">
							<img class="listedvideolistthumbnailoc" src="<?php echo htmlentities($mostviewedvideo->videothumbnail);?>" alt=""/> 
						</a>
						<div id="mvaddtoqlbdiv<?php echo $mostviewedvideo->id; ?>" class="videolistqlbtnoc">

							<img id="mvaddtoqlimg_js_<?php echo $mostviewedvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $mostviewedvideo->id; ?>', '<?php echo htmlentities($mostviewedvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $mostviewedvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
							<img id="mvaddtoqlimg_js_rem<?php echo $mostviewedvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

						</div>						
					</div>

					<div class="listedvideolistextrasdivoc">
	
							
							<?php echo $mostviewedvideo->useravatar; ?><br/>
							<?php echo $mostviewedvideo->usernamelinked; ?>
							<div style="">
								<?php echo $mostviewedvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<?php echo JText::_('Views');?> : <?php echo $mostviewedvideo->hits; ?>
													
							
						
					</div>					

					
					<div class="clear"></div>
				</div>



				<?php	
	 
				
				}
						
			} else {

				foreach ($this->mostviewedvideos as $mostviewedvideo) {
				
					$safevideotitle = str_replace("'", "\'", $mostviewedvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($mostviewedvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideomc">
					<div class="backgroundpadding">
						<div class="listedvideolisttitledivmc">
							<a href="<?php echo $mostviewedvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $mostviewedvideo->videotitle;?>
							</a>
						</div>
					</div>
					
					<div class="backgroundpadding">
						<div class="listedvideolistbodymc">
							<div class="listedvideolistthumbdivmc">
								<a href="<?php echo $mostviewedvideo->videolink;?>">
									<img class="listedvideolistthumbnailmc" src="<?php echo htmlentities($mostviewedvideo->videothumbnail);?>" alt=""/> 
								</a>
								<div id="mvaddtoqlbdiv<?php echo $mostviewedvideo->id; ?>" class="videolistqlbtnmc">

									<img id="mvaddtoqlimg_js_<?php echo $mostviewedvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $mostviewedvideo->id; ?>', '<?php echo htmlentities($mostviewedvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $mostviewedvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
									<img id="mvaddtoqlimg_js_rem<?php echo $mostviewedvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

								</div>	

								<div class="listedvideolistdurationdivmc"><?php echo $mostviewedvideo->duration;?>
								</div>
								
							</div>
							<div style="clear:both;"></div>
							<div class="listedvideolistvotestarsmc">
								<?php echo $mostviewedvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<div class="listedvideousernamemc">
								<?php echo $mostviewedvideo->usernamelinked; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo $mostviewedvideo->addeddate; ?>
							</div>
							
							<div class="clear"></div>

							<div class="listedvideousernamemc">
								<?php echo JText::_('Views');?>: <?php echo $mostviewedvideo->hits; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo JText::_('Comments');?>: <?php echo $mostviewedvideo->commentcount; ?>
							</div>
							
							<div class="clear"></div>

							
						</div>
					</div>
				</div>
				


				<?php	
	 
				
				}			
			
			
			}
			
			
			?>
			
			<div class="clear"></div>
			<div class="paginatordiv">
			
				<?php echo $this->mvvpageNav; ?>
			
			</div>		
						
			<div style="clear:both;"></div>				
		</div>
		<!-- END OF MOST VIEVED VIDEOS-->

		
		
		<!-- START OF HIGHEST RATED VIDEOS-->
		<div id="highestrated"  >

			<div>
				<div  style="float:right;">
					<?php
					
						//create switch button here
						if ($this->mainhrvdisplay=="oc") {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mhrvd=multi");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchmulti.png";?>" alt="" />
						</a>
						
						<?php
						
						} else {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mhrvd=oc");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchoc.png";?>" alt="" />
						</a>
						
						<?php							
						}
					
					?>

				</div>
				<div style="clear:both;"></div>
			</div>


				
			<?php
	
			//generate one column view
			if ($this->mainhrvdisplay == "oc") {
			
				foreach ($this->highestratedvideos as $highestratedvideo) {
				
					$safevideotitle = str_replace("'", "\'", $highestratedvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($highestratedvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideooc">
					<div class="listedvideolistinfooc">

						<div class="listedvideolisttitledivoc">
							<a href="<?php echo $highestratedvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $highestratedvideo->videotitle;?>
							</a>
						</div>
						<div class="listedvideolistdescdivoc">
							<?php echo $highestratedvideo->videodescription;?>
						</div>
						<div class="listedvideolistfootdivoc">
							<?php echo JText::_('Added Date');?>: <?php echo $highestratedvideo->addeddate;?>   - <?php echo JText::_('Duration');?>: <?php echo $highestratedvideo->duration;?>
						</div>
						
					</div>
					
					<div class="listedvideolistthumbdivoc">
						<a href="<?php echo $highestratedvideo->videolink;?>">
							<img class="listedvideolistthumbnailoc" src="<?php echo htmlentities($highestratedvideo->videothumbnail);?>" alt=""/> 
						</a>
						<div id="hraddtoqlbdiv<?php echo $highestratedvideo->id; ?>" class="videolistqlbtnoc">

							<img id="hraddtoqlimg_js_<?php echo $highestratedvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $highestratedvideo->id; ?>', '<?php echo htmlentities($highestratedvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $highestratedvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
							<img id="hraddtoqlimg_js_rem<?php echo $highestratedvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

						</div>						
					</div>

					<div class="listedvideolistextrasdivoc">
	
							
							<?php echo $highestratedvideo->useravatar; ?><br/>
							<?php echo $highestratedvideo->usernamelinked; ?>
							<div style="">
								<?php echo $highestratedvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<?php echo JText::_('Views');?> : <?php echo $highestratedvideo->hits; ?>
													
							
						
					</div>					

					
					<div class="clear"></div>
				</div>



				<?php	
	 
				
				}
						
			} else {

			

			
				foreach ($this->highestratedvideos as $highestratedvideo) {

					$safevideotitle = str_replace("'", "\'", $highestratedvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($highestratedvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideomc">
					<div class="backgroundpadding">
						<div class="listedvideolisttitledivmc">
							<a href="<?php echo $highestratedvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $highestratedvideo->videotitle;?>
							</a>
						</div>
					</div>
					
					<div class="backgroundpadding">
						<div class="listedvideolistbodymc">
							<div class="listedvideolistthumbdivmc">
								<a href="<?php echo $highestratedvideo->videolink;?>">
									<img class="listedvideolistthumbnailmc" src="<?php echo htmlentities($highestratedvideo->videothumbnail);?>" alt=""/> 
								</a>
								<div id="hraddtoqlbdiv<?php echo $highestratedvideo->id; ?>" class="videolistqlbtnmc">

									<img id="hraddtoqlimg_js_<?php echo $highestratedvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $highestratedvideo->id; ?>', '<?php echo htmlentities($highestratedvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $highestratedvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
									<img id="hraddtoqlimg_js_rem<?php echo $highestratedvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

								</div>	

								<div class="listedvideolistdurationdivmc"><?php echo $highestratedvideo->duration;?>
								</div>
								
							</div>
							<div style="clear:both;"></div>
							<div class="listedvideolistvotestarsmc">
								<?php echo $highestratedvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<div class="listedvideousernamemc">
								<?php echo $highestratedvideo->usernamelinked; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo $highestratedvideo->addeddate; ?>
							</div>
							
							<div class="clear"></div>

							<div class="listedvideousernamemc">
								<?php echo JText::_('Views');?>: <?php echo $highestratedvideo->hits; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo JText::_('Comments');?>: <?php echo $highestratedvideo->commentcount; ?>
							</div>
							
							<div class="clear"></div>

							
						</div>
					</div>
				</div>
				


				<?php	
	 
				
				}			
			
			
			}
			
			
			?>
			
			<div class="clear"></div>
			<div class="paginatordiv">
			
				<?php echo $this->hrvpageNav; ?>
			
			</div>		
						
			<div style="clear:both;"></div>		
		
		</div>
		<!-- END OF HIGHEST RATED VIDEOS-->
				
				

		<!-- START OF FEATURED VIDEOS-->
		<div id="featured"  >
<div>
				<div  style="float:right;">
					<?php
					
						//create switch button here
						if ($this->mainfvdisplay=="oc") {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mfvd=multi");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchmulti.png";?>" alt="" />
						</a>
						
						<?php
						
						} else {
						?>
						<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=main&mfvd=oc");?>">
							<img src="<?php echo JURI::root()."components/com_seyret/themes/default/images/switchoc.png";?>" alt="" />
						</a>
						
						<?php							
						}
					
					?>

				</div>
				<div style="clear:both;"></div>
			</div>


				
			<?php
	
			//generate one column view
			if ($this->mainfvdisplay == "oc") {
			
				foreach ($this->featuredvideos as $featuredvideo) {
				
					$safevideotitle = str_replace("'", "\'", $featuredvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($featuredvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideooc">
					<div class="listedvideolistinfooc">

						<div class="listedvideolisttitledivoc">
							<a href="<?php echo $featuredvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $featuredvideo->videotitle;?>
							</a>
						</div>
						<div class="listedvideolistdescdivoc">
							<?php echo $featuredvideo->videodescription;?>
						</div>
						<div class="listedvideolistfootdivoc">
							<?php echo JText::_('Added Date');?>: <?php echo $featuredvideo->addeddate;?>   - <?php echo JText::_('Duration');?>: <?php echo $featuredvideo->duration;?>
						</div>
						
					</div>
					
					<div class="listedvideolistthumbdivoc">
						<a href="<?php echo $featuredvideo->videolink;?>">
							<img class="listedvideolistthumbnailoc" src="<?php echo htmlentities($featuredvideo->videothumbnail);?>" alt=""/> 
						</a>
						<div id="fvaddtoqlbdiv<?php echo $featuredvideo->id; ?>" class="videolistqlbtnoc">

							<img id="fvaddtoqlimg_js_<?php echo $featuredvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $featuredvideo->id; ?>', '<?php echo htmlentities($featuredvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $featuredvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
							<img id="fvaddtoqlimg_js_rem<?php echo $featuredvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

						</div>						
					</div>

					<div class="listedvideolistextrasdivoc">
	
							
							<?php echo $featuredvideo->useravatar; ?><br/>
							<?php echo $featuredvideo->usernamelinked; ?>
							<div style="">
								<?php echo $featuredvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<?php echo JText::_('Views');?> : <?php echo $featuredvideo->hits; ?>
													
							
						
					</div>					

					
					<div class="clear"></div>
				</div>



				<?php	
	 
				
				}
						
			} else {

			

			
				foreach ($this->featuredvideos as $featuredvideo) {

					$safevideotitle = str_replace("'", "\'", $featuredvideo->videotitle);
					$safevideotitle = str_replace("\"", "&quot;", $safevideotitle);				
				
					$inql = false;
					if (in_array($featuredvideo->id, $this->quicklistarray)) {
						$inql = true;			
					}

				?>
				
				<div class="listedvideolistvideomc">
					<div class="backgroundpadding">
						<div class="listedvideolisttitledivmc">
							<a href="<?php echo $featuredvideo->videolink;?>" style="font-weight:bold;">
								<?php echo $featuredvideo->videotitle;?>
							</a>
						</div>
					</div>
					
					<div class="backgroundpadding">
						<div class="listedvideolistbodymc">
							<div class="listedvideolistthumbdivmc">
								<a href="<?php echo $featuredvideo->videolink;?>">
									<img class="listedvideolistthumbnailmc" src="<?php echo htmlentities($featuredvideo->videothumbnail);?>" alt=""/> 
								</a>
								<div id="fvaddtoqlbdiv<?php echo $featuredvideo->id; ?>" class="videolistqlbtnmc">

									<img id="fvaddtoqlimg_js_<?php echo $featuredvideo->id; ?>" class="addtoquicklistbutton" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/add_ql.png";?>" alt="" onclick="jQuery.seyrettools.addtoquicklist('<?php echo $featuredvideo->id; ?>', '<?php echo htmlentities($featuredvideo->videothumbnail);?>', '<?php echo $safevideotitle; ?>', '<?php echo $featuredvideo->videonojxlink; ?>')" style="visibility:<?php echo ($inql==false)? 'visible' : 'hidden';?>;"/>
									<img id="fvaddtoqlimg_js_rem<?php echo $featuredvideo->id; ?>" src="<?php echo JURI::root()."components/com_seyret/themes/default/images/added_ql.png";?>" alt="" style="visibility:<?php echo $inql==false ? 'hidden' : 'visible';?>; margin-left:-16px;"/>

								</div>	

								<div class="listedvideolistdurationdivmc"><?php echo $featuredvideo->duration;?>
								</div>
								
							</div>
							<div style="clear:both;"></div>
							<div class="listedvideolistvotestarsmc">
								<?php echo $featuredvideo->votestars; ?>
								<div class="clear"></div>
							</div>
							
							<div class="listedvideousernamemc">
								<?php echo $featuredvideo->usernamelinked; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo $featuredvideo->addeddate; ?>
							</div>
							
							<div class="clear"></div>

							<div class="listedvideousernamemc">
								<?php echo JText::_('Views');?>: <?php echo $featuredvideo->hits; ?>
							</div>
							
							<div class="listedvideoaddeddatemc">
								<?php echo JText::_('Comments');?>: <?php echo $featuredvideo->commentcount; ?>
							</div>
							
							<div class="clear"></div>

							
						</div>
					</div>
				</div>
				


				<?php	
	 
				
				}			
			
			
			}
			
			
			?>
			
			<div class="clear"></div>
			<div class="paginatordiv">
			
				<?php echo $this->fvpageNav; ?>
			
			</div>		
						
			<div style="clear:both;"></div>				
		</div>
		<!-- END OF FEATURED VIDEOS-->
		
		<!-- START OF CATEGORIES-->
		<div id="categories"  >
			<?php 
				//MODIFY CATEGORIES PART TO MAKE APPEARANCE MORE SMART
				foreach ($this->categorylist as $category) {
?>
			<div class="listedvideolistvideomc">
					<div class="backgroundpadding">
						<div class="listedvideolisttitledivmc">
							<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=category&task=videos&id=".$category->id);?>" style="font-weight:bold;">
								<?php echo $category->categoryname;?>
							</a>
						</div>
					</div>
					
					<div class="backgroundpadding">
						<div class="listedvideolistbodymc">
							<div class="listedvideolistthumbdivmc">
								<a href="<?php echo $this->absURL("index.php?option=com_seyret&view=category&task=videos&id=".$category->id);?>">
									<img class="listedvideolistthumbnailmc" src="<?php echo $category->categoryimage;?>" alt=""/> 
								</a>
								
								
							</div>
										
							<div class="clear"></div>

							
						</div>
					</div>
				
				</div>
				

<?php				
				
				
				}
				
				
				
				
			?>
		<div class="clear"></div>
		</div>
		
		<!-- END OF CATEGORIES-->

	</div>			
			
</div>



</div>

